From 12ef034b7ba29404bc3fd4e384115e7b00f3c125 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Sat, 15 Feb 2014 15:17:58 +0000 Subject: [PATCH] location: Make _connectToGeoclue() reentrent https://bugzilla.gnome.org/show_bug.cgi?id=723684 --- js/ui/status/location.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/ui/status/location.js b/js/ui/status/location.js index bc42a4e1d..b14bd8abb 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -41,13 +41,19 @@ const Indicator = new Lang.Class({ }, _connectToGeoclue: function() { + if (this._proxy != null || this._connecting) + return false; + + this._connecting = true; new GeoclueManager(Gio.DBus.system, 'org.freedesktop.GeoClue2', '/org/freedesktop/GeoClue2/Manager', Lang.bind(this, this._onProxyReady)); + return true; }, _onProxyReady: function (proxy, error) { + this._connecting = false; if (error != null) { log (error.message); return; -- 2.39.5